import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView  from 'uview-ui'
import './uni.promisify.adaptor'
import request from './api/request.js'
import tabBar from '@/components/tabBar.vue'
import  store from '@/store/index.js'
import fui from './commont/fui-app'
// 将 request 对象添加到 Vue 实例的原型中，以便在组件中全局使用
Vue.prototype.$request = request
Vue.config.productionTip = false
Vue.prototype.fui = fui
App.mpType = 'app'
Vue.use(uView)
Vue.component('tab-bar',tabBar)
const app = new Vue({
	store,
  ...App,
   created() {
      // 在 Vue 实例创建时调用 getUserInfo 方法
      this.$store.dispatch('getUserInfo');
    }
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif